// 保存文章
function saveShop(){
    var param = {};
    
    // 收集参数 校验
    var shoptypeid = $("#shoptypeid").val();
    if(shoptypeid == '-1'){
    	autoCloseAlert("请选择商户类型",500);
    	return false;
    }
    //param["shoptypeid"] = shoptypeid;
    
    var shopname = $("#shopname").val();
    if(isEmpty(shopname)){
    	autoCloseAlert("请输入商铺名称",500);
    	return false;
    }
    //param["shopname"] = shopname;
    
    var uptime = $("#uptime").val();
    if(isEmpty(uptime)){
    	autoCloseAlert("请输入上架时间",500);
    	return false;
    }
    //param["uptime"] = uptime;
    
    
    var downtime = $("#downtime").val();
    if(isEmpty(downtime)){
    	autoCloseAlert("请输入下架时间",500);
    	return false;
    }
    //param["downtime"] = downtime;
    
    var location = $("#location").val();
    if(isEmpty(location)){
    	autoCloseAlert("请输入下位置",500);
    	return false;
    }
    //param["location"] = location;
    
    
   /* var arr = [];
    arr.push(UE.getEditor('editor').getContent());
    var content = arr.join("\n");
    */
    // 简介
    var content = UM.getEditor('myEditor').getAllHtml();
    $("form").submit();
    // 保存文章
   /* $.ajax({
        type : "POST",
        url : '../article/add',
        data : 'param='+encodeURI(encodeURI(JSON.stringify(param)))+"&content="+encodeURI(encodeURI(content)).replace(/\&/g, "%26").replace(/\+/g, "%2B")+"&description="+encodeURI(encodeURI(description)),
        success  : function(data) {
        	if(data.resultCode != 'success'){
        		autoCloseAlert(data.errorInfo,1000);
				return false;
			}else{
				// 调到列表页
				window.location.href = "../article/list";
			}
		}
    });*/
}

function cancelSaveArticle(){
	window.location.href = "../article/list";
}